package org.sy.lab.Java7并发编程实战.一线程管理.六等待线程的终止;

import java.util.Date;

public class Main {
	public static void main(String[] args) {
		DataSourcesLoader dataLoader = new DataSourcesLoader();
		Thread thread1 = new Thread(dataLoader, "DataSourceTHread");
		NetworkConnectionsLoader cnLoader = new NetworkConnectionsLoader();
		Thread thread2 = new Thread(cnLoader, "NetworkConnectionsLoader");
		thread1.start();
		thread2.start();
		try {
			thread1.join();
			thread2.join();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.printf("Main: Configuration has been loaded: %s\n", new Date());
	}
}
